<!doctype html>
<html lang="en">
<head>
	<base href="../">
    <meta charset="UTF-8">
    <meta name="viewport"
    	content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>自定义表单</title>
	<link rel="stylesheet" href="css/layui.css">
	<link rel="stylesheet" href="css/style_createForm.css">
</head>
<body>
<div class="layui-fluid" >
	<div class="layui-row ">
		<div class="layui-col-md1">
			<div class="layui-card nav click-but">
				<div class="layui-card-header">模块选择</div>
				<div class="layui-card-body">
					<button class="layui-btn menu" data-size="block" data-type="text">输入框</button>
					<button class="layui-btn menu" data-size="block" data-type="select">选择框</button>
					<button class="layui-btn menu" data-size="block" data-type="checkbox_many">复选框</button>
					<button class="layui-btn menu" data-size="block" data-type="checkbox_switch">开关</button>
					<button class="layui-btn menu" data-size="block" data-type="radio">单选框</button>
					<button class="layui-btn menu" data-size="block" data-type="textarea">文本域</button>
					<button class="layui-btn menu" data-size="block" data-type="upload_file">文件</button>
					<button class="layui-btn menu" data-size="block" data-type="submit">提交</button>
					
				</div>
				<div class="layui-card-header">操作</div>
				<div class="layui-card-body" text-align="center">
					<button class="layui-btn menu" data-size="block" data-type="saveTable" >保存</button>
					<button class="layui-btn layui-btn-danger" data-type="del"> <i class="layui-icon">&#xe640;</i></button>
				</div>
			</div>
			</div>
			<div class="layui-col-md9 layui-col-md-offset1">
				<div class="layui-card content">
					<div class="layui-card-header">表单制作
					</div>
					<div class="layui-card-body code">
						<div class="layui-form-item">
							<label class="layui-form-label">表单标题</label>
							<div class="layui-input-block">
								<input type="text" name="formName" id="formName" lay-verify="required" lay-reqtext="表单标题不能为空" placeholder="请输入表单标题" value="" class="layui-input">
							</div>
						</div>
						<div class="layui-form-item layui-form-text">
							<label class="layui-form-label">表单描述</label>
							<div class="layui-input-block">
								<textarea id="formDescription" placeholder="请输入内容" class="layui-textarea"></textarea>
							</div>
						</div>
						<hr >
						<form class="layui-form" action="" onsubmit="return false">
						</form>
					</div>
				</div>
			</div>
		</div>

	</div>
</div>
</body>
<script type="text/javascript" src="layui.js"></script>
<script>
    layui.config({
        base: 'js/'
    }).use('createForm2');
</script>


	
<script src="js/axios.min.js" charset="utf-8"></script>
<script src="js/lay-module/tableSelect/tableSelect.js" charset="utf-8"></script>
<!-- <script>
    layui.use(['form','tableSelect'], function () {
        var form = layui.form,
            layer = layui.layer,
            $ = parent.layui.jquery;
        var tableSelect = layui.tableSelect;
        //监听提交
        form.on('submit(formCreated)', function (data) {
            var index = layer.alert(JSON.stringify(data.field), {
                title: '确认提交'
            }, function () {

                // 关闭弹出层
                layer.close(index);
                // console.log("data",data)
                
                axios.post('/formCreatedPost', data.field)
                .then(function (response) {
                    // console.log(response);
                    });
                    parent.layer.msg("数据添加成功！",{icon:1})

                })
                .catch(function (error) {
                    parent.layer.msg("数据添加失败！",{icon:2})
                }); 			


                var iframeIndex = parent.layer.getFrameIndex(window.name);
                parent.layer.close(iframeIndex);
                
            });

            return false;
        });

</script> -->

</html>